package com.ofa.service.impl;

import java.io.Serializable;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ofa.dao.URMDao;
import com.ofa.entity.URM;
import com.ofa.service.URMService;


@Service(value="uRMService")
public class URMServiceImpl implements URMService {
	
	private URMDao uRMDao;
	
	public URM get(Serializable id) {
		return uRMDao.get(id, URM.class);
	}

	public void delete(Serializable id) {
		uRMDao.delete(id, URM.class);
	}

	public void save(URM entity) {
		uRMDao.save(entity);
	}

	public void update(URM entity) {
		uRMDao.update(entity);
	}

	@Override
	public void saveOrUpdatePermission(String principalType,
			Integer principalId, Integer moduleId, String permission, Boolean yes) {
		uRMDao.saveOrUpdatePermission(principalType, principalId, moduleId, permission, yes);
	}


	
	
	
	public URMDao getURMDao() {
		return uRMDao;
	}
	@Autowired
	public void setURMDao(URMDao uRMDao) {
		this.uRMDao = uRMDao;
	}

}
